<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}铃声系统{% endblock %}</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
    <style>
        body {
            padding-top: 20px;
            background-color: #f8f9fa;
        }
        .header {
            background-color: #007bff;
            color: white;
            padding: 15px 0;
            margin-bottom: 20px;
            border-radius: 5px;
        }
        .nav-link {
            font-weight: 500;
        }
        .card {
            box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
            margin-bottom: 20px;
        }
        .card-header {
            background-color: #f8f9fa;
            font-weight: 600;
        }
        .footer {
            margin-top: 30px;
            padding: 20px 0;
            text-align: center;
            color: #6c757d;
            border-top: 1px solid #dee2e6;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header text-center">
            <h1><i class="fas fa-bell"></i> 铃声系统</h1>
            <p>基于Flask和SQLite的定时音频播放管理系统</p>
        </div>

        <ul class="nav nav-tabs mb-4">
            <li class="nav-item">
                <a class="nav-link {% if request.endpoint == 'index' %}active{% endif %}" href="{{ url_for('index') }}">
                    <i class="fas fa-home"></i> 主控制台
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link {% if request.endpoint == 'schedule' %}active{% endif %}" href="{{ url_for('schedule') }}">
                    <i class="fas fa-clock"></i> 方案管理
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link {% if request.endpoint == 'audio' %}active{% endif %}" href="{{ url_for('audio') }}">
                    <i class="fas fa-music"></i> 铃声库管理
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link {% if request.endpoint == 'settings' %}active{% endif %}" href="{{ url_for('settings') }}">
                    <i class="fas fa-cog"></i> 系统设置
                </a>
            </li>
            <li class="nav-item ms-auto">
                <a class="nav-link" href="{{ url_for('logout') }}">
                    <i class="fas fa-sign-out-alt"></i> 登出
                </a>
            </li>
        </ul>

        {% block content %}{% endblock %}

        <div class="footer">
            <p>&copy; 2025 铃声系统 - 基于Flask和SQLite的定时音频播放管理系统</p>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    {% block scripts %}{% endblock %}
</body>
</html>